﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HomeProfileWorkProcessAdmin.ascx.cs" 
Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenPersonality.HomeProfileWorkProcessAdmin" %>

<owc:OwGrid ID="HomeProfileWorkProcessGrid" runat="server" SkinID="OwGridAdmin"
    DataSourceID="HomeProfileWorkProcessOds" CellSpacing="0" GridLines="None" 
    OwEnableMessageDisplay="True" OwMessageDisplayControl="" 
    OwMessageDisplayType="InPlace">
    <MasterTableView DataSourceID="HomeProfileWorkProcessOds" DataKeyNames="OpenHomeProfileWorkProcessID">
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>" RefreshText="<%$ OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:Code %>'>
                <ItemTemplate>
                    <%# Eval("OpenHomeProfileWorkProcessID") %>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:TitleLabel %>'>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td colspan="2">
                                <a href="#" onclick='return false;'><b>
                                    <%# Eval("Name") %>
                                </b></a>
                            </td>
                        </tr>   
                        <tr>
                            <td>                                
                                <owc:OwR ID="ProfileDetailOwR" runat="Server" OwText="ProfileDetailLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#OwOpenHomeProfileDetailsBLL.OwGetEntity(Eval("OpenHomeProfileDetailID").OwToInt64TryParseReturn0()).Title%>
                            </td>
                        </tr>
                        <tr>
                            <td>                                
                                <owc:OwR ID="ParentOwR" runat="server" OwText="ParentLabel" OwSuffix=":" />
                            </td>
                            <td>
                                <%# OwOpenHomeProfileWorkProcessBLL.OwGetEntity((long?)Eval("ParentID")).Name%>
                            </td>
                        </tr>      
                        <tr>
                            <td>                                
                                <owc:OwR ID="CompanyOwR" runat="server" OwText="CompanyLabel" OwSuffix=":" />
                            </td>
                            <td>
                                <%# OwCompaniesBLL.OwGetEntity(Eval("CompanyID").OwToInt64TryParseReturn0()).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>                                
                                <owc:OwR ID="JobTitleOwR" runat="server" OwText="JobTitleLabel" OwSuffix=":" ></owc:OwR>
                            </td>
                            <td>
                                <%# (OwEnum.JobTitles)Eval("JobTitleID").OwToInt64TryParseReturn0()%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="JobPositionOwR" runat="Server" OwText="JobPositionLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# OwJobPositionsBLL.OwGetEntity((byte?)Eval("JobPositionID").OwToInt64TryParseReturn0()).Name%>
                            </td>
                        </tr>               
                        <tr>
                            <td>                                
                                <owc:OwR ID="DateTimeStartOwR" runat="Server" OwText="DateTimeStartLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# Eval("DateTimeStart").OwToDateTimePublishDate() %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="DateTimeEndOwR" runat="Server" OwText="DateTimeEndLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# Eval("DateTimeEnd").OwToDateTimePublishDate() %>
                            </td>
                        </tr>

                                                
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:InfoLabel %>'>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>                                
                                <owc:OwR ID="LanguageOwR" runat="server" OwText="Language" OwSuffix=":" />
                            </td>
                            <td>
                                <%# Eval("LanguageCode") %>
                            </td>
                        </tr>
                        <tr>
                            <td>                                
                                <owc:OwR ID="ContinentOwR" runat="server" OwText="ContinentLabel" OwSuffix=":" ></owc:OwR>
                            </td>
                            <td>
                                <%# OwLocalitiesBLL.OwGetEntity(Eval("ContinentID").OwToInt64TryParseReturn0()).Name %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="CountryOwR" runat="Server" OwText="CountryLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# OwLocalitiesBLL.OwGetEntity(Eval("CountryID").OwToInt64TryParseReturn0()).Name %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="ProvinceOwR" runat="Server" OwText="ProvinceLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# OwLocalitiesBLL.OwGetEntity(Eval("ProvinceID").OwToInt64TryParseReturn0()).Name %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="DistrictOwR" runat="Server" OwText="DistrictLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# OwLocalitiesBLL.OwGetEntity(Eval("DistrictID").OwToInt64TryParseReturn0()).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="WardOwR" runat="Server" OwText="WardLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# OwLocalitiesBLL.OwGetEntity(Eval("WardID").OwToInt64TryParseReturn0()).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="DescriptionOwR" runat="server" OwText="DescriptionLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# Eval("Description").OwGetLeft(100,true) %>
                            </td>
                        </tr>                        
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:CommandLabel %>'>
                <ItemTemplate>
                    <table>                        
                        <tr>
                            <td>
                                <%--<asp:Literal ID="DeletedLabel" runat="server" Text="<%$ OwR: Delete%>" />:--%>
                                <owc:OwR ID="DeletedOwR" runat="server" OwText="DeleteLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsDeletedCheckBox" runat="server" Checked='<%#Eval("IsDeleted")%>' Text='<%# Eval("OpenHomeProfileWorkProcessID") %>'
                                    CssClass="HiddenText" OnCheckedChanged="IsDeletedCheckBox_CheckedChanged" AutoPostBack="true" />                            
                            </td>
                        </tr>                       
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" FilterControlAltText="Filter TemplateColumn1 column"
                UniqueName="TemplateColumn1">
                <ItemTemplate>
                    <a href='/Admin/Views/Site/HomeProfileWorkProcessEdit.aspx?id=<%#Eval("OpenHomeProfileWorkProcessID")%>'>
                        <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                            id="UpdateImage" alt="" /></a></ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn">
                <ItemTemplate>
                    <asp:ImageButton CausesValidation="true" onClientClick='if(!confirm("Are you sure to  Delete?")) return false' ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton" ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
            <FormTemplate>
                <%
                    Response.Redirect("BlogsEdit.aspx");
                %>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
</owc:OwGrid>
<%--<owc:OwObjectDataSource ID="OwObjectDataSource1" runat="server" 
    DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenHomeProfileWorkProcessEntity" 
    DeleteMethod="OwDelete" InsertMethod="OwInsert" 
    OldValuesParameterFormatString="original_{0}" SelectMethod="OwGetByDynamic" 
    TypeName="Micronet.OpenWeb.Com.BLL.OwOpenHomeProfileWorkProcessBLL" 
    UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="isDeleted" Type="Boolean" />
        <asp:Parameter Name="religionID" Type="Int64" />
        <asp:Parameter Name="openHomeProfileDetailID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>--%>

<owc:OwObjectDataSource ID="HomeProfileWorkProcessOds" runat="server" 
    OldValuesParameterFormatString="original_{0}" SelectMethod="OwGetByDynamic"
    SelectCountMethod="OwGetByDynamicCount" EnablePaging="True"
    TypeName="Micronet.OpenWeb.Com.BLL.OwOpenHomeProfileWorkProcessBLL" 
    DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenHomeProfileWorkProcessEntity" 
    DeleteMethod="OwDelete" InsertMethod="OwInsert" UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="parentID" Type="Int64" />
        <asp:Parameter Name="isDeleted" Type="Boolean" DefaultValue="false" />
        <asp:Parameter Name="continentID" Type="Int64" />
        <asp:Parameter Name="countryID" Type="Int64" />
        <asp:Parameter Name="provinceID" Type="Int64" />
        <asp:Parameter Name="districtID" Type="Int64" />
        <asp:Parameter Name="wardID" Type="Int64" />
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter Name="companyID" Type="Int64" />
        <asp:Parameter Name="openHomeProfileDetailID" Type="Int64" />
        <asp:Parameter Name="jobTitleID" Type="Int64" />
        <asp:Parameter Name="jobPositionID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>